# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.BigQuery.V2.Model.DatasetListDatasets do
  @moduledoc """
  A dataset resource with only a subset of fields, to be returned in a list of datasets.

  ## Attributes

  *   `datasetReference` (*type:* `GoogleApi.BigQuery.V2.Model.DatasetReference.t`, *default:* `nil`) - The dataset reference. Use this property to access specific parts of the dataset's ID, such as project ID or dataset ID.
  *   `friendlyName` (*type:* `String.t`, *default:* `nil`) - An alternate name for the dataset. The friendly name is purely decorative in nature.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The fully-qualified, unique, opaque ID of the dataset.
  *   `kind` (*type:* `String.t`, *default:* `nil`) - The resource type. This property always returns the value "bigquery#dataset"
  *   `labels` (*type:* `map()`, *default:* `nil`) - The labels associated with this dataset. You can use these to organize and group your datasets.
  *   `location` (*type:* `String.t`, *default:* `nil`) - The geographic location where the dataset resides.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :datasetReference => GoogleApi.BigQuery.V2.Model.DatasetReference.t() | nil,
          :friendlyName => String.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :labels => map() | nil,
          :location => String.t() | nil
        }

  field(:datasetReference, as: GoogleApi.BigQuery.V2.Model.DatasetReference)
  field(:friendlyName)
  field(:id)
  field(:kind)
  field(:labels, type: :map)
  field(:location)
end

defimpl Poison.Decoder, for: GoogleApi.BigQuery.V2.Model.DatasetListDatasets do
  def decode(value, options) do
    GoogleApi.BigQuery.V2.Model.DatasetListDatasets.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.BigQuery.V2.Model.DatasetListDatasets do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
